﻿using AutoMapper;
using Esosi.Register.Base;
using Esosi.Register.Base.Dtos;
using Esosi.Register.Hospital.Profiles;
using Esosi.Repository;
using Esosi.Repository.Models;
using System;
using System.Collections.Generic;
using System.Text;

namespace Esosi.Register.Hospital
{
    public class RegisterBalanceHospital : IRegisterBalance
    {
        private readonly IMapper _mapper;
        private readonly IRegisterBalanceRespository _service;

        private RegisterBalanceModel _RegisterBalanceModel;

        public RegisterBalanceHospital(IMapper mapper, IRegisterBalanceRespository registerBalanceRespository)
        {
            _mapper = mapper;
            _service = registerBalanceRespository;
        }

        public Action<RegisterBalanceTpoDto> SendThird { get; set; }

        public RegisterBalanceTpoDto RegisterBalance(Guid guid)
        {
            //RegisterBalanceTpoDto registerBalanceTpoDto = new RegisterBalanceTpoDto();

            var tpo = _service.SaveCtRegisterInfo(guid);

            SendThird?.Invoke(tpo);

            return tpo;
        }
    }
}